package com.mingda.weathermagiccenter.controller;


import com.alibaba.fastjson.JSONObject;
import com.mingda.weathermagiccenter.task.InsertGeoJsonTask;
import io.swagger.v3.oas.annotations.Operation;

import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;


@Tag(name = "热力图相关调用", description = "热力图相关调用")
@Slf4j
@RestController
@ConditionalOnProperty(prefix = "weathergeojson",name = "enabled",havingValue = "true")
@RequestMapping("/mdweatherapi")
public class WeatherGeoController {

    @Autowired
    private InsertGeoJsonTask insertGeoJsonTask;

    @Operation(summary = "执行生成热力图", description = "执行生成热力图")
    @PostMapping("dogeometry")
    public ResponseEntity geometrytask(@RequestBody JSONObject jsonObject) {
       // insertGeoJsonTask.geometry(jsonObject);
        return ResponseEntity.ok(null);
    }




}
